import request from '/@/utils/request';

const workable_api = import.meta.env.VITE_WORKABLE_API as string;

/**
 * 获取节点表单管理列表
 * @param params 
 */
export function getWorkableFormList(params?: object){
    return request({
        url: workable_api + '/form/list',
        method: 'get',
        params: params
    })
}

/**
 * 获取节点表单
 * @param params 
 */
export function getWorkableForm(params?: object){
    return request({
        url: workable_api + '/form/info',
        method: 'get',
        params: params
    })
}

/** 新增节点表单 */
export function addWorkableForm(params? : object){
    return request({
        url: workable_api + '/form/add',
        method: 'post',
        data: params
    });
}

/** 修改节点表单 */
export function editWorkableForm(params?: object) {
    return request({
        url: workable_api + '/form/edit',
        method: 'post',
        data: params
    });
}

/** 删除节点表单 */
export function delWorkableForm(params?: object){
    return request({
        url: workable_api + '/form/remove',
        method: 'post',
        data: params
    });
}
